/**
 * 全局路由配置
 * @author 高桥凉介
 * @date 2024-12-24 02:50:41
 */
import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'layout',
      component: () => import('../Layout/GlobalLayout.vue'),
      children: [
        {
          path: 'home',
          name: 'home',
          component: () => import('../views/HomeView.vue'),
        },
        {
          path: 'wuliu',
          name: 'wuliu',
          component: () => import('../views/WuliuView.vue'),
        },
        {
          path: 'center',
          name: 'center',
          component: () => import('../views/TaskView.vue'),
        },
        {
          path: 'about',
          name: 'about',
          component: () => import('../views/TalkView.vue'),
        },
        {
          path: 'user',
          name: 'user',
          component: () => import('../views/PersonView.vue'),
        },
      ],
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/LoginView.vue'),
    },
    {
      path: '/register',
      name: 'register',
      component: () => import('../views/RegisterView.vue'),
    },
  ],
})

export default router
